#pragma once

#include <vector>

#include "G4Types.hh"

class RunData
{
public:
    static RunData& Instance();  // 线程本地单例

private:
    RunData() = default;
    ~RunData() = default;

    // 禁止拷贝和赋值
    RunData(const RunData&) = delete;
    RunData& operator=(const RunData&) = delete;

    ///======================================== energy list
public:
    inline void AppendEnergy(G4double en) { _energyList.push_back(en); }
    inline const std::vector<G4double>& GetEnergyList() const { return _energyList; }

private:
    std::vector<G4double> _energyList;

    ///======================================== single energy
public:
    inline void SetEnergy(G4double engy) { _energy = engy; }
    inline G4double GetEnergy() const { return _energy; }

private:
    G4double _energy{};
};
